<!-- @Author: Yu_Bo -->
<template>
	<view class="successfully">
		<view class="main">
			<image src="@/static/images/img/successfully.png" mode=""></image>
			<view class="title">
				提交成功
			</view>
			<view class="btn color_right page_button" @click="serviceBtn">
				立即咨询
			</view>
		</view>
		<!--  -->
		<c-promptone ref="promptone" text="客服微信号已复制到粘贴板\n请在微信中搜索添加"></c-promptone>
	</view>
</template>

<script>
	import { mapState } from "vuex"
	export default {
		components: {},
		data() {
			return{
				
			}
		},
		computed: {
			...mapState({
				sellinginfo: (state) => state.sellinginfo
			}),
		},
		onLoad() {},
		onShow() {},
		onUnload() {
			uni.switchTab({
				url: "/pages/sell/index"
			})
		},
		methods: {
			// 复制微信
			serviceBtn() {
				var that = this
				uni.setClipboardData({
					data: that.sellinginfo.wx_customer,
					success: function () {
						uni.hideToast()
						console.log('success');
						that.$refs.promptone.openBtn()
					}
				});
			},
		},
	}
</script>

<style lang='scss' scoped>
	.successfully {
		width: 100%;
		height: 100vh;
		
		.main {
			width: 100%;
			height: 100%;
			display: flex;
			align-items: center;
			flex-direction: column;
			
			image {
				display: block;
				width: 310rpx;
				height: 276rpx;
				margin-top: 20%;
			}
			
			.title {
				padding-top: 80rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 36rpx;
				color: #222222;
			}
			
			.btn {
				width: 280rpx;
				height: 80rpx;
				margin-top: 50rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 30rpx;
				color: #FFFFFF;
				border-radius: 45rpx;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}
</style>